﻿using System;
using Microsoft.SharePoint;

namespace WoltersKluwer.SPChainGang.Core.Constants
{
    public static class Fields
    {
        public static class ConfigurationListFields
        {
            public static Field Target = new Field("__Target", SPFieldType.Note);
            public static Field Destination = new Field("__Destination", SPFieldType.Note);
            public static Field Level = new Field("__Level", SPFieldType.Integer);
        }
        
        public static class ReportListFields
        {
            public static Field Origin = new Field("__Origin", SPFieldType.Note);
            public static Field Detected = new Field("__Detected", SPFieldType.Note);
            public static Field Replacement = new Field("__Replacement", SPFieldType.Note);
            public static Field AdditionalInfo = new Field("Title", SPFieldType.Text);
        }

        [Serializable]
        public class Field
        {
            public Field(String name)
            {
                InternalName = name;
            }

            public Field(String name, SPFieldType type)
                : this(name)
            {
                Type = type;
            }

            public String InternalName { get; set; }

            public SPFieldType Type { get; set; }
        }

    }

}
